﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="sanpham.aspx.cs" Inherits="sanpham" %>
<%@ Register TagPrefix="cc1" Namespace="SiteUtils" Assembly= "CollectionPager" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <style type="text/css">
        .style4
        {
            width: 100%;
        }
        .style11
        {
            width: 780px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <div style="width:800px; margin-top:10px">
        <asp:MultiView ID="MultiView1" runat="server" 
            onactiveviewchanged="MultiView1_ActiveViewChanged">
            <asp:View ID="View1" runat="server">
            <asp:DataList ID="dlsanpham" runat="server"  RepeatColumns="4" 
                    style="margin-left: 0px" Width="800px" BackColor="White" 
                    BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px" CellPadding="4" 
                    ForeColor="Black" GridLines="Horizontal" OnSelectedIndexChanged="dlsanpham_SelectedIndexChanged">
                <FooterStyle BackColor="#CCCC99" ForeColor="Black" />
                <HeaderStyle BackColor="#333333" Font-Bold="True" ForeColor="White" />
                <ItemTemplate>
                    <table class="style4" style="width : 150px; height:300px" bgcolor="White">
                        
                        <tr>
                            <td align="center">
                             <a href="chitietsanpham.aspx?MaSach=<%#Eval("MaSach") %>" title="" style="text-decoration:none" >
                                <asp:Image ID="Image7" runat="server" Height="150px" 
                                    ImageUrl='<%# "image/"+ Eval("Hinh") %>' Width="100px"/></a>
                            </td>
                        </tr>
                        <tr >
                            <td align="center" >
                                <div style="height:60px; max-height:80px; overflow:hidden; width:100%; margin:0; padding:0;">
                                <asp:Label ID="Label1" runat="server" Font-Bold="True" ForeColor="#0000CC" 
                                    Text='<%# Eval("TenSach") %>'></asp:Label></div>
                            </td>
                        </tr>
                        <tr>
                            <td style="text-align: center" align="center" height="20">
                                <asp:Label ID="Label2" runat="server" Font-Bold="True" ForeColor="#009933" 
                                    Text='<%# Eval("TacGia") %>'></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td style="text-align: center" align="center" height="20">
                                <asp:Label ID="Label3" runat="server"  ForeColor="Red"  
                                    Text='<%# Eval("DonGia")%>' Font-Bold="True"></asp:Label> <bold>VND</bold> 
                            </td>
                        </tr>
                        
                        <tr>
                            <td align="center" 
                                style="text-align: center; color: #0000FF; font-style: italic;" 
                                height="30">
                                <div style="width: 150px; height: 30px" align="center">
                                    <a href="themsanphamvaogio.aspx?MaSach=<%#Eval("MaSach") %>"title="" style="text-decoration: none">
                                        <asp:Image ID="btnAddToCart" runat="server" Height="30px" ImageUrl="~/image/datmua_icon.jpg"
                                            Width="103px" style="margin-left: 13px" /></a>
                                            &nbsp;&nbsp;&nbsp;</div>
                                </td>
                              
                                
                        </tr>

                    </table>
                </ItemTemplate>

                <SelectedItemStyle BackColor="#CC3333" Font-Bold="True" ForeColor="White" />

</asp:DataList>
              <div style="width: 800px">
                    <table align="center">
                        <tr>
                            <td align="center" class="style11">
                                <cc1:collectionpager id="clp1" runat="server" BackText="« Lùi" 
                                    LabelText="Trang số:" NextText="Tới »" ResultsFormat="Results {0}-{1} (of {2})"></cc1:collectionpager>
                            </td>
                        </tr>
                    </table>
                </div>

            </asp:View>
            <asp:View ID="View2" runat="server">
                <div align="center" style=" width:800px; padding-top: 20px; font-size: 20px; font-weight: bold;
                    font-style: normal;">
                    <asp:Label ID="lbkhongcosanpham" runat="server" Text=""></asp:Label>
                    <br />
                    <asp:HyperLink ID="HyperLink1" NavigateUrl="~/trangchu.aspx" runat="server">Quay Về Trang Chủ</asp:HyperLink>
                </div>
            </asp:View>
        </asp:MultiView>
        </div>
      
</asp:Content>

